package com.dc.adaptor.transport.addressconvertor;

import com.dc.adaptor.transport.TransportMeta;
import com.dc.adaptor.transport.queue.QueueMeta;

public class QueueAddressConvertor implements AddressConvertor<TransportMeta>{

	@Override
	public String getAddress(TransportMeta meta) {
		QueueMeta queueMeta = (QueueMeta)meta;
		return queueMeta.getQueue();
	}

	@Override
	public TransportMeta getMeta(final String address) {
		return new QueueMeta(){
			@Override
			public String getQueue() {
				return address;
			}
			
		};
	}

}
